import qs from 'qs'
import request from './request'
import {HTTP_URL} from '@/utils/constant'

export default function login(data) {
  return request({
    url: `${HTTP_URL}/adminLogin/login`,
    method: 'POST',
    withCredentials: true,
    data: qs.stringify(data)
  })
}

export function userLogin(data) {
  return request({
    url: `${HTTP_URL}/user/login`,
    method: 'POST',
    data
  })
}